import React from 'react';

function FlowTotalInfo({ flowInfo = {} }) {
  return (
    <div className="flowInfo">
      <div className="flowItem">
        <span>当前连接数</span>
        <span>{flowInfo.active || 0}</span>
      </div>
      <div className="flowItem">
        <span>状态</span>
        <span>{flowInfo.flag ? '正常' : '不正常'}</span>
      </div>
      <div className="flowItem">
        <span>已处理连接数</span>
        <span>{flowInfo.serverRequests || 0}</span>
      </div>
      <div className="flowItem">
        <span>创建握手数</span>
        <span>{flowInfo.serverAccepts || 0}</span>
      </div>
      <div className="flowItem">
        <span>已处理请求数</span>
        <span>{flowInfo.serverHandle || 0}</span>
      </div>
      <div className="flowItem">
        <span>驻留连接数</span>
        <span>{flowInfo.waiting || 0}</span>
      </div>
    </div>
  );
}

export default FlowTotalInfo;
